//
//  ViewController.m
//  ProjectDemo
//
//  Created by Jason on 15/12/3.
//  Copyright © 2015年 Happy. All rights reserved.
//

#import "ViewController.h"
#import "VC1.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.navigationItem.title = @"this is the title this is the title MMM";
    // Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor = [UIColor whiteColor];
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    [btn setTitle:@"JUMP" forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
    btn.frame = CGRectMake(CGRectGetMidX(self.view.frame) - 40, 0, 80, 40);
    [btn addTarget:self action:@selector(Jump) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
    
    
    NSLog(@"x=%f y=%f w=%f h=%f",CGRectGetMinX(self.view.frame),CGRectGetMinX(self.view.frame),CGRectGetWidth(self.view.frame),CGRectGetHeight(self.view.frame));
}

- (void)Jump{
    
    VC1 *vc1 = [[VC1 alloc] init];
    [self.navigationController pushViewController:vc1 animated:YES];
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
